package tetris;

import static org.junit.Assert.*;

import java.nio.file.FileVisitOption;
import java.util.Random;

import org.junit.Test;

import tetris.Form.Tetrominoes;

public class FormTest {

	@Test
	public void testForm() {
		Form f = new Form();
		int i = f.x(0);
		assertEquals(i, 0);
		int j = f.y(0);
		assertEquals(j, 0);
		
		try {
					    f.setShape(Tetrominoes.NoShape);
		}
		catch(Exception e){
			
		}
		
		
	}

	@Test
	public void testSetShape() {
				
		fail("Not yet implemented");
	}

	@Test
	public void testX() {
				
		fail("Not yet implemented");
	}

	@Test
	public void testY() {
		fail("Not yet implemented");
	}

	@Test
	public void testGetShape() {
		fail("Not yet implemented");
	}

	@Test
	public void testSetRandomShape() {
	Form f = new Form();
		
	try{
	 Random r = new Random();
     int x = Math.abs(r.nextInt()) % 7 + 1;
     Tetrominoes[] values = Tetrominoes.values();
	f.setShape(values[x]);
		
	}
	catch(Exception e){
		
	}
		// fail("Not yet implemented");
	}

	@Test
	public void testMinX() {
		fail("Not yet implemented");
	}

	@Test
	public void testMinY() {
		fail("Not yet implemented");
	}

	@Test
	public void testRotateLeft() {
	Form f = new Form();
	Tetrominoes k;
	Tetrominoes pieceShape = null;
	
	assertFalse(pieceShape == Tetrominoes.SquareShape );
		
		try{
			  Form result = new Form();
			
		}
		catch(Exception E){
			
		}
	}

	@Test
	public void testRotateRight() {
		Form f = new Form();
		Tetrominoes k;
		Tetrominoes pieceShape = null;
		
		assertFalse(pieceShape == Tetrominoes.SquareShape );
			
			try{
				  Form result = new Form();
				
			}
			catch(Exception E){
				
			}
	}

}
